import request from "@/utils/request";

/**
 * 获取设备软件列表
 * @param params
 * @returns
 */
export function getsoftwareList(data) {
  return request({
    url: '/management/machine.machine_version/getList',
    method: 'post',
    data
  })
}

/**
 * 添加设备软件
 * @param params
 * @returns
 */
export function addsoftware(data) {
  return request({
    url: '/management/machine.machine_version/add',
    method: 'post',
    data
  })
}

/**
 * 修改设备分组列表
 * @param params
 * @returns
 */
export function updatesoftware(data) {
  return request({
    url: '/management/machine.machine_version/update',
    method: 'post',
    data
  })
}

/**
 * 删除设备分组列表
 * @param params
 * @returns
 */
export function delsoftware(data) {
  return request({
    url: '/management/machine.machine_version/del',
    method: 'post',
    data
  })
}

/**
 * 发布更新计划
 * @param params
 * @returns
 */
export function addupdateplan(data) {
  return request({
    url: '/management/machine.machine_version_plan/add',
    method: 'post',
    data
  })
}

/**
 * 上下架更新任务
 * @param params
 * @returns
 */
export function onlineupdateplan(data) {
  return request({
    url: '/management/machine.machine_version_plan/update',
    method: 'post',
    data
  })
}

/**
 * 查询设备软件更新计划列表
 * @param params
 * @returns
 */
export function getupdateplanlist(data) {
  return request({
    url: '/management/machine.machine_version_plan/getList',
    method: 'post',
    data
  })
}

/**
 * 删除更新计划
 * @param params
 * @returns
 */
export function delupdateplan(data) {
  return request({
    url: '/management/machine.machine_version_plan/del',
    method: 'post',
    data
  })
}
